<div class="card">
  <div class="row row-cards row-deck">
    <div class="col-12">
      <div class="card-body">
        <h5>订单信息</h5>
        <div class="row">
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">订单编号</label>
              <div class="form-control-plaintext"><%= @order.trade_no %></div>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">下单时间</label>
              <div class="form-control-plaintext"><%= formattime(@order.created_at, unit: "hour") %></div>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">付款方式</label>
              <div class="form-control-plaintext"><%= i18n_enum @order, :pay_method %></div>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">状态</label>
              <div class="form-control-plaintext"><%= i18n_enum @order, :state %></div>
            </div>
          </div>
        </div>
        <div class="line"></div>
        <h5>用户信息</h5>
        <div class="row">
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">下单用户姓名</label>
              <div class="form-control-plaintext"><%= @order.user.blank? ? "用户已删除" : @order.user.nickname %></div>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">下单用户账号</label>
              <div class="form-control-plaintext"><%= @order.user.blank? ? "用户已删除" : @order.user.phone %></div>
            </div>
          </div>
        </div>
        <div class="line"></div>
        <h5>物流信息</h5>
        <div class="row">
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">收货姓名</label>
              <div class="form-control-plaintext"><%= @order.buyer_name %></div>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">收货手机</label>
              <div class="form-control-plaintext"><%= @order.buyer_phone %></div>
            </div>
          </div>
          <div class="col-md-12">
            <div class="form-group">
              <label class="form-label">快递方式</label>
              <div class="form-control-plaintext"><%= @order.address %></div>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">快递方式</label>
              <div class="form-control-plaintext"><%= @order.need_express ? "快递" : "自提" %></div>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">快递公司</label>
              <div class="form-control-plaintext"><%= @order.logistics_company.blank? ? "" : @order.logistics_company.name %></div>
            </div>
          </div>
          <div class="col-md-4">
            <div class="form-group">
              <label class="form-label">快递单号</label>
              <div class="form-control-plaintext"><%= @order.logistics_trade_no %></div>
            </div>
          </div>
        </div>
        <div class="line"></div>
        <h5>商品信息</h5>
        <table class="table table-hover table-outline table-vcenter text-nowrap card-table">
          <thead>
            <tr>
              <th>商品</th>
              <th>规格</th>
              <th>单价</th>
              <th>数量</th>
              <th>金额</th>
              <th>优惠券说明</th>
            </tr>
          </thead>
          <tbody>
            <% @order.order_items.each do |order_item| %>
              <tr>
                <td><%= order_item.spu_name %></td>
                <td><%= order_item.option_value_presentation %></td>
                <td><%= order_item.fee %></td>
                <td><%= order_item.quantity %></td>
                <td><%= order_item.fee * order_item.quantity %></td>
                <td><%=  %></td>
              </tr>
            <% end %>
          </tbody>
        </table>
      </div>
      <div class="card-footer text-right">
      </div>
    </div>
  </div>
</div>